package entity.thread;

public class MyThread extends Thread{

    public MyThread(String name) {
        super(name);
    }

    public void run(){
        for (int i = 0; i < 50; i++) {
            System.out.println(getName()+"->"+i);
            //礼让线程，表示让出执行权，尽可能让各个线程请求均匀一点
//            Thread.yield();
        }
    }
}
